﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using K9Nano.Reporting;

namespace K9Nano.Domain.Reporting;

public class ReportEntity
{
    public int Id { get; set; }

    /// <summary>
    /// 报表名称
    /// </summary>
    [StringLength(50)]
    public string DisplayName { get; set; }

    [StringLength(255)]
    public string Description { get; set; }

    /// <summary>
    /// 查询总数据量的SQL语句
    /// </summary>
    public string TotalSqlText { get; set; }

    /// <summary>
    /// 查询当前页数据的SQL语句
    /// </summary>
    public string SqlText { get; set; }

    /// <summary>
    /// 参数信息
    /// </summary>
    public List<ReportFormItem> Fields { get; set; }

    /// <summary>
    /// 列信息
    /// </summary>
    public List<ReportColumn> Columns { get; set; }

    /// <summary>
    /// 是否启用
    /// </summary>
    public bool IsEnabled { get; set; }

    public long CreatedBy { get; set; }

    public DateTime CreatedAt { get; set; }

    public long? UpdatedBy { get; set; }

    public DateTime? UpdatedAt { get; set; }
}
